#ifndef LITERAL_HPP_GUARD
#define LITERAL_HPP_GUARD

#include "logger.hpp"
#include "entity.hpp"

namespace mashine { namespace kb {

/**
 * this class represent Literal or literal. in itself 
 * contains information about is denied
 * 
 * Literal is function defined on set M1xM2xM3x...xMn, 
 * or  
 */
struct Literal : Entity<std::string>
{	
public:
	/**
	 * No call this constructor manualy
	 */
	Literal();
	
	/**
	 * To manualy create literal entity call THIS constructor
	 */
    Literal(std::string name, std::vector<std::string> params, bool denied = false);
	Literal(const Literal & literal);
    virtual ~Literal();

	bool isDenied() const;
	void setDenied(bool denied);
	
	bool isFact() const;

    virtual std::string toString() const;
	
	Literal operator - () const;
	
	bool operator == (const Literal & l) const;
	bool operator != (const Literal & l) const;
	
	// Literal & operator = (const Literal & l);

protected:
	
	bool denied;

	/**
	 * need owerride this method in child class 
	 * to correct work Entity constructor
	 */
	virtual bool validateName() const;
	
	/**
	 * need owerride this method in child class 
	 * to correct work Entity constructor
	 */
	virtual bool validateParam() const;
};

}}

#endif
